package com.consumer.util;

import com.consumer.feignService.FeignService;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class HystrixClientFallbackFactory implements FallbackFactory<FeignService> {

    @Override
    public FeignService create(Throwable throwable) {
        return () -> "Feign + hystrix ,提供者服务挂了";
    }

}
